package com.babyqiao.wallpaper.manager.dao;

import com.babyqiao.wallpaper.manager.controller.dto.AlbumQuery;
import com.babyqiao.wallpaper.manager.entity.WallpaperAlbum;
import com.babyqiao.wallpaper.manager.entity.vo.AlbumResVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 专辑DAO
 *
 * @author qinglongzhai
 */
@Repository
public interface AlbumMapper extends BaseMapper<WallpaperAlbum> {

    /**
     *获得所有专辑
     * @Author QLZ
     * @Date 2021/2/20
     *
     *  @return: java.util.List<com.babyqiao.wallpaper.manager.entity.vo.AlbumResVO>
     */

    List<AlbumResVO> getAllAlbum();

    /**
     *根据id获取专辑
     * @Author QLZ
     * @Date 2021/2/20
     *
     *  @return: com.babyqiao.wallpaper.manager.entity.vo.AlbumResVO
     */

    AlbumResVO getAlbumById(String id);

    /**
     *多条件分页查询
     * @Author QLZ
     * @Date 2021/2/20
     *  @param page: 分页
     @param albumQuery: 查询条件
     *  @return: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.babyqiao.wallpaper.manager.entity.WallpaperAlbum>
     */

    Page<AlbumResVO> findAndPage(Page<AlbumResVO> page, AlbumQuery albumQuery);
}
